package com.lexiang.base;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

/**
 * @BelongsProject:lx_parent
 * @BelongsPackage:com.lexiang.base
 * @Author:linchong
 * @CreateTime:2019-04-02 19:27
 * @Description:基础类
 */
@SpringBootApplication
@EnableEurekaClient
public class BaseApplication {
    public static void main(String[] args) {
        SpringApplication.run(BaseApplication.class,args);
    }

    //注入id生成器
    @Bean
    public IdWorker idWorker(){
        return new IdWorker(1,1);
    }
}
